//
//  UIImage+XL.h
//  campus
//
//  Created by xl on 2019/12/15.
//  Copyright © 2019 xl. All rights reserved.
//



#import <UIKit/UIKit.h>


@interface UIImage (XL)

+ (UIImage *)imageWithColor:(UIColor *)color;

+ (UIImage*)imageWithColor:(UIColor*)color size:(CGSize)size;

- (UIImage *)imageWithRoundedCornersSize:(float)cornerRadius;

+ (UIImage *)imageWithClipImage:(UIImage *)image borderWidth:(CGFloat)borderWidth borderColor:(UIColor *)color;

/*
 方向矫正
 1.先将头朝上
 2.将镜象反转
 3.重新合成图片
 
 */

+ (UIImage*)fixOrientation:(UIImage*)aImage;

/** 根据文本生成二维码图片 imageWidth图片宽度 **/
+ (UIImage *)qrCodeImageWithQRString:(NSString *)qrCode imageWidth:(CGFloat)imageWidth;
/** 图片合成加水印 **/
+ (UIImage *)imageWithWaterMarkImage:(UIImage *)image waterImage:(UIImage *)waterImage waterImageRect:(CGRect)rect;

@end


